@import "./vars.less";

@font-face {
  font-family: numberFont;
  src: url(./font/LcdD.ttf);
}
// 数字样式
.number {
  font-weight: bold;
  font-size: 1.8rem;
  color: #fff;
  font-family: numberFont;
  white-space: nowrap;
}

// 英文样式
.english {
  font-size: 1.6rem;
}

// 文字按钮
.text-button {
  padding: 4px 12px;
  cursor: pointer;
  color: @lightBlue;
}

// 主色渐变可点击tag
.active-tag {
  padding: 2px 10px;
  color: #fff;
  background-color: #fff;
  background-image: linear-gradient(
    180deg,
    rgba(24, 144, 255, 1) 0%,
    rgba(24, 144, 255, 0.8) 100%
  );
  border-radius: 4px;
  cursor: pointer;
}

// 半透明图标
.info-icon {
  width: 3.6rem;
  height: 3.6rem;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  font-size: 2rem;
  border-radius: 4px;
  color: @primaryColor;
  box-sizing: 0px 0px 10px 0 rgba(0, 0, 0, 0.2);
}

// 大圆角主色按钮
.round-button {
  background-color: @primaryColor;
  padding: 2px 12px;
  border-radius: 20px;
  color: #fff;
  cursor: pointer;
  //   TODO hover时添加特效
}
.gray-button {
  background-color: rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.8);
}

// 特殊弹层样式
.datav-modal {
  color: @lightWhite;
  background-color: @lightBlue;
  width: 100%;
  height: 100%;
  background: radial-gradient(@lightBlue, @deepBlue 80%);
  border-radius: 4px;
  user-select: none;
  box-shadow: 0px 0px 16px 0px @deepBlue;
  font-size: 1.4rem;
  .modal-title {
    position: relative;
    height: 50px;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url(../images/modal_title.png) no-repeat;
    background-size: 100% 100%;
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    .modal-close {
      position: absolute;
      right: 20px;
      top: 0;
      bottom: 0;
      width: 40px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 2.4rem;
    }
  }
  .modal-content {
    padding: 20px;
    height: calc(~"100% - 160px");
    overflow: hidden auto;
  }
  .modal-footer {
    height: 80px;
    display: flex;
    justify-content: center;
    padding-top: 20px;
    margin-bottom: 40px;
    .footer-btn {
      width: 220px;
      height: 60px;
      line-height: 60px;
      letter-spacing: 4px;
      color: #fff;
      font-size: 2rem;
      font-weight: bold;
      cursor: pointer;
    }
  }
}

// 加载中
.loading {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.text-white {
  color: #fff;
}
.text-primary {
  color: @primaryColor;
}
.text-green {
  color: @lightGreen;
}
.text-right {
  text-align: right;
}
.text-left {
  text-align: left;
}
.ml-4 {
  margin-left: 4px;
}
.mt-5 {
  margin-top: 5px;
}
.flex {
  display: flex;
}
.align-center {
  align-items: center;
}
.align-end {
  align-items: end;
}
.space-between {
  justify-content: space-between;
}
.flex-col {
  display: flex;
  flex-direction: column;
}
.h-100p {
  height: 100%;
}
.w-100p {
  width: 100%;
}
.inline-block {
  display: inline-block;
}
.block {
  display: block;
}
.border-radius-4 {
  border-radius: 4px;
  overflow: hidden;
}
.over-hidden {
  overflow: hidden;
}
.overx-auto {
  overflow-x: auto;
}
.text-center {
  text-align: center;
}

// chart title and box
.chart-box1 {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: 1rem;
  font-size: 1.2rem;
  .chart-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
    height: 4rem;
    line-height: 4rem;
    .item {
      cursor: pointer;
      color: rgba(255, 255, 255, 0.8);
    }
    .active {
      position: relative;
      color: #fff;
      &::after {
        content: "";
        position: absolute;
        width: 70%;
        left: 15%;
        height: 0.3rem;
        bottom: -0.4rem;
        background: @primaryColor;
        border-radius: 2px;
      }
    }
  }
  .chart-content {
    position: relative;
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    box-shadow: 0px 0px 1rem 0px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    width: 100%;
    font-size: 1.4rem;
    overflow: hidden;
    white-space: nowrap;
    &::before {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      top: 0;
      bottom: 0;
      z-index: -1;
      backdrop-filter: blur(0.3rem);
    }
  }
}

.chart-box2 {
  height: 100%;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  .chart-title {
    height: 3rem;
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 1.4rem;
    letter-spacing: 1px;
    &::before {
      content: "";
      display: inline-block;
      width: 0.3rem;
      height: 50%;
      background-color: @textGreen;
      margin-right: 0.6rem;
    }
  }
  .chart-content {
    margin-top: 1rem;
    flex: 1;
    overflow: hidden;
  }
}

.chart-container {
  width: 100%;
  height: 100%;
}

.tab-full-page {
  position: fixed;
  z-index: 30;
  left: @bodyLRPadding;
  right: @bodyLRPadding;
  top: @headerHeight + 1rem;
  bottom: @tabHeight + 1rem;
  pointer-events: auto;
  overflow: hidden;
  // .col-box {
  //   height: 33%;
  // }
}

.text-number-1 {
  font-size: 1.2rem;
  .number {
    line-height: 4rem;
    margin-top: -1rem;
  }
}
.text-number-2 {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  .icon {
    font-size: 2.4rem;
    margin-right: 1rem;
  }
  .number {
    font-size: 2rem;
  }
  .tip {
    margin-top: -0.5rem;
  }
}

.total-number {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  .number-box {
    height: 50%;
    line-height: 100%;
    color: @textGreen;
    font-size: 3.2rem;
    vertical-align: middle;
  }
  .title {
    height: 30%;
    line-height: 100%;
    vertical-align: middle;
    margin-top: 1rem;
  }
}

.table-board {
  display: flex;
  flex-direction: column;
  .header {
    height: 3rem;
    font-size: 1.2rem;
    .header-col {
      padding: 0 8px;
    }
  }
  .table-content {
    width: 100%;
    flex: 1;
    overflow: hidden;
  }
}

.no-building-tip {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.24);
  font-size: 1.2rem;
}

.breathe {
  position: absolute;
  overflow: hidden;
  border-radius: 50% 50%;
  animation-timing-function: ease-in-out;
  animation-duration: 2000ms;
  animation-iteration-count: infinite;
  animation-direction: alternate;
  border: 0.2rem solid rgba(255, 255, 255, 0.1);
  &-green {
    animation-name: breatheGreen;
  }
  &-blue {
    animation-name: breatheBlue;
  }
}

@keyframes breatheGreen {
  0% {
    box-shadow: 0 0 1rem 0.4rem rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
  }
  100% {
    box-shadow: 0 0 2rem 1rem rgba(22, 153, 183, 0.6);
    border-color: rgba(22, 153, 183, 0.6);
  }
}
@keyframes breatheBlue {
  0% {
    box-shadow: 0 0 1rem 0.4rem rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.1);
  }
  100% {
    box-shadow: 0 0 2rem 1rem rgba(24, 144, 255, 0.6);
    border-color: rgba(24, 144, 255, 0.6);
  }
}
